/**
@file
	LogDevice.cpp
@brief
	log tool.
@author
	GengYong
@revision
	2005/11/05 * Created by GengYong.
*/


#include "LogDevice.h"
#include <cstdio>

using namespace PrivateUtil;

void LogDevice::Output(int level, const char * fmt, va_list args) const
{
	switch(level)
	{
	case PrivateUtil::OUTLEVEL_DEBUG:
	case PrivateUtil::OUTLEVEL_LOG:
	case PrivateUtil::OUTLEVEL_WARN:
	case PrivateUtil::OUTLEVEL_ERROR:
	default:
		vprintf(fmt, args);
		break;
	}
	return;
}

void LogDevice::Outputln(int level, const char * fmt, va_list args) const
{
	Output(level, fmt, args);
	printf("\n");
	return;
}


void LogDevice::OutputRaw(int level, const char * fmt, ...) const
{
	va_list args;
	va_start(args, fmt);
	Output(level, fmt, args);
	va_end(args);
	return;
}

